/*
 * $Id: zycl.h 7557b5d4d82b 2012/12/02 09:07:16 pgurumur $
 *
 * Copyright (c) 2006, 2007, 2008 Prabhu Gurumurthy <pgurumur@gmail.com>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#ifndef ZYCL_H
#define ZYCL_H

#include <sys/types.h>

#include <iostream>
#include <string>

#include <zypp/ZYpp.h>
#include <tcl.h>

namespace zycl {
   class zycl {
      public:
         zycl(Tcl_Interp *, int32_t &, Tcl_Obj *const *);
         zycl(const zycl &);
         zycl &operator= (const zycl &);
         ~zycl();

         std::string tostring(Tcl_Obj *);
         int provides(std::string &);
         int search(std::string &);
         int length(void) const;
         void help();

      protected:
         void _addItemToList(Tcl_Interp *, Tcl_Obj *, std::string &);

         zypp::ZYpp::Ptr _zyclptr;
         Tcl_Interp *_interp;
         std::string _program;
         int32_t _argc;
   };
}

#endif
